package VN.EDU.IMIC.DEVELOPER.TRANTHITHANHNGA.ARRAY.EX4;

public class Controllers {
	private Models mObj;

	public Controllers() {
		mObj = new Models();
	}

	public int yieldMin(int[] arr) {
		return mObj.min(arr);
	}

	public int yieldMax(int[] arr) {
		return mObj.max(arr);
	}

	public int[] yieldMinArray(int[] arr, int shOpt) {
		return mObj.minOrMaxArray(arr, mObj.min(arr));
	}

	public int[] yieldMaxArray(int[] arr, int shOpt) {
		return mObj.minOrMaxArray(arr, mObj.max(arr));
	}
}
